import { pagify, MyPage } from 'base/'
@pagify()
export default class extends MyPage {
  data = {
    value: 123,
    imageList: [
      'https://lorempixel.com/400/500',
      'https://lorempixel.com/500/600',
      'https://lorempixel.com/600/700',
      'https://lorempixel.com/700/800',
    ],
    tabList: [
      { label: '畅销榜', id: 1, image: 'https://lorempixel.com/45/45' },
      { label: '今日特价', id: 2, image: 'https://lorempixel.com/45/45' },
      { label: '联系客服', id: 3, image: 'https://lorempixel.com/45/45' },
      { label: '邀请好友', id: 4, image: 'https://lorempixel.com/45/45' }
    ],
    goodList: [
      { id: 1, img: 'https://lorempixel.com/food/400/400', title: '商品', desc: '商品描述', price: 9.9, priceDisable: 19.9, capsule: { type: 'danger', leftText: '五折', rightText: '新品' } },
      { id: 2, img: 'https://lorempixel.com/food/400/400', title: '商品', desc: '商品描述', price: 9.9, priceDisable: 19.9, capsule: { type: 'danger', leftText: '五折', rightText: '新品' } },
      { id: 3, img: 'https://lorempixel.com/food/400/400', title: '商品', desc: '商品描述', price: 9.9, priceDisable: 19.9, capsule: { type: 'danger', leftText: '五折', rightText: '新品' } },
      { id: 4, img: 'https://lorempixel.com/food/400/400', title: '商品', desc: '商品描述', price: 9.9, priceDisable: 19.9, capsule: { type: 'danger', leftText: '五折', rirightTextght: '新品' } }
    ]
  }

  async onLoad(options: any) {
    this.test()
  }

  test() {
    this.app.fetch({ api: 'goods', id: 5 })
  }
}
